<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    html {
      height: 5000px;
    }

    .fixed {
      position: fixed;
      right: 5px;
      top: 5px;
    }
  </style>
</head>

<body>
  <button class="open">打开淘宝</button>
  <button class="close">关闭淘宝</button>
  <div class="fixed">
    <button class="scrollBy">scrollBy</button>
    <button class="scrollTo">scrollTo</button>
  </div>
</body>
<script>
  // window相关的属性 

  console.log(window);

  // 窗口的可视宽高 (不包含控制台    =>  文档 + 滚动条 )
  console.log(window.innerWidth, window.innerHeight);

  // 窗口的实际宽高 (包含控制台      =>  文档 + 滚动条 + 控制台)
  console.log(window.outerWidth, window.outerHeight);

</script>

</html>